package com.kangdi.server.controller;


import com.kangdi.server.pojo.Menu;
import com.kangdi.server.service.IMenuService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * InnoDB free: 7168 kB; (`parentId`) REFER `yeb/t_menu`(`id`) 前端控制器
 * </p>
 *
 * @author kangdi
 * @since 2022-10-04
 */
@RestController
@RequestMapping("/system/cfg")
public class MenuController {
    @Autowired
    private IMenuService menuService;
    @ApiOperation(value = "通过用户id查询菜单")
    @GetMapping("/menu")
    public List<Menu> getMenuByAdminId(){
       return menuService.getMenuByAdminId();
    }
}
